package com.lmk.homework;



import java.util.Scanner;

public class work1 {
    public static void main(String[] args) {
        int c=0;
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个四位数会员数字：");
        c=sc.nextInt();

        int a=c%10;
        int b=(c/10)%10;
        int  d=(c/10/10)%10;
        int  e=(c/10/10/10)%10;
        //计算四位数之和
        int  f=a+b+d+e;


        System.out.println("会员数字"+c+"之和为："+f);
        boolean q=f>20;
        System.out.println("是幸运客户吗?"+q);
    }

}
